package com.caishi.lkx.exam.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.caishi.lkx.exam.model.ExamQuestionRank;
import com.zzw.common.service.service.SuperRouterDataService;
import com.caishi.lkx.exam.ienum.type.RankType;
import com.caishi.lkx.exam.records.RecordsCollectType;

import java.util.List;


public interface IExamQuestionRankService extends SuperRouterDataService<ExamQuestionRank.ExamQuestionRankBaseModel, ExamQuestionRank<?>, Long> {


    /**
     * 科目排行
     *
     * @param examId
     * @param categoryId
     * @param page
     * @param type       排行类型
     * @param keyword
     * @return 排行榜数据
     */
    IPage<ExamQuestionRank.ExamQuestionRankBaseModel> rankData(String examId, Long categoryId, Page<ExamQuestionRank.ExamQuestionRankBaseModel> page, RankType type, String keyword, String currentQid);


    /**
     * 添加试题做题次数。错题次数，收藏次数
     *
     * @param data
     */
    void addDoCount(ExamQuestionRank.ExamQuestionRankBaseModel data, RecordsCollectType recordsCollectType);

    List<ExamQuestionRank.ExamQuestionRankBaseModel> isRank(String examId, Long categoryId, RankType type, String questionId);
}
